import { combineReducers } from 'redux'
import { employeesApi } from '../api/employeesApi'
import { usersApi } from '../api/userApi'
import { authApi } from '../api/authApi'
import { authReducer } from '../slice/auth.slice'
import { projectEmployeeLinksApi } from '../api/projectEmployeeLinksApi'
import { projectsApi } from '../api/projectsApi'
import { projectManagersApi } from '../api/projectManagersApi'
import { tmpReducer } from '../slice/tmp.slice'
import { modalReducer } from '../slice/modal.slice'
import { employeesReducer } from '../slice/employees.slice'
import { projectsReducer } from '../slice/projects.slice'
import { projectEmployeeLinksReducer } from '../slice/projectEmployeeLinks.slice'
import { projectManagersReducer } from '../slice/projectManagers.slice'


export const rootReducer = combineReducers({
    [employeesApi.reducerPath]: employeesApi.reducer,
    [usersApi.reducerPath]: usersApi.reducer,
    [authApi.reducerPath]: authApi.reducer,
    [projectEmployeeLinksApi.reducerPath]:projectEmployeeLinksApi.reducer,
    [projectsApi.reducerPath]: projectsApi.reducer,
    [projectManagersApi.reducerPath]: projectManagersApi.reducer,
    auth: authReducer,
    tmp: tmpReducer,
    modal: modalReducer,
    employees: employeesReducer,
    projects: projectsReducer,
    projectEmployeeLinks: projectEmployeeLinksReducer,
    projectManagers: projectManagersReducer
})
